home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Ultimedia 2
/
Ultimedia 2.iso
/
tools
/
soundtools
/
dasmodplayer
/
rexx
/
makelist.drx
next >
Wrap
Text File
|
1994-07-12
|
3KB
|
135 lines
/*
Make Module List, D.A.S ModulePlayer REXX-script for making modulelists!
V0.03 By Erno Tuomainen
This version can also save list to a file! You can specify a range which to list! You can also
specify if you want to list ALL modules or just modules which author are KNOWN or UNKNOWN !
*/
OPTIONS Results
ADDRESS 'DASMP'
signal on error
signal on syntax
signal on ioerr
signal on break_c
signal on break_d
unknownauthor = 'Unknown'
indexwidth = 4
namewidth = 22
authorwidth = 15
stylewidth = 15
timewidth = 6
datewidth = 9
MODCOUNT
modcounter=result
say ''
say 'Modulelist Generator for D.A.S Moduleplayer, V0.03 by Erno Tuomainen'
say ''
say 'You have 'modcounter' modules in your list currently loaded to D.A.S'
call writech(stdout, 'Do you want to list them all (Y/N)? ')
answer = readln(stdin)
answer = upper(answer)
if answer='Y' then do
startlist = 0
endlist = modcounter
END
else DO
call writech(stdout, 'Enter starting position (0-'modcounter')? ')
startlist = readln(stdin)
call writech(stdout, 'Enter ending position ('startlist+1'-'modcounter')? ')
endlist = readln(stdin)
END
say ''
listmode = 'ALL'
call writech(stdout, 'Module list mode, ALL/KNOWN/UNKNOWN (A/K/U)?')
answer = readln(stdin)
answer = upper(answer)
if answer='K' then listmode='KNOWN'
if answer='U' then listmode='UNKNOWN'
call writech(stdout, 'List to File or Screen (F/S)? ')
answer = readln(stdin)
answer = upper(answer)
if answer='F' then DO
listfile='YES'
call writech(stdout, 'Enter pathfilename for the list? ')
listfilename = readln(stdin)
END
else
listfile='NO'
listheader1 = left("Num", indexwidth)' 'left("Module name", namewidth)' 'left("Author", authorwidth)' 'left("Style", stylewidth)' 'left("Length", timewidth)' 'left("Date", datewidth)
listheader2 = '---------------------------------------------------------------------------'
if listfile='YES' then DO
call open(listfilehandle, listfilename, 'W')
call writeln(listfilehandle, listheader1)
call writeln(listfilehandle, listheader2)
END
else DO
say listheader1
say listheader2
END
DO modspec= startlist to endlist
MOVETO modspec
GETAUTHOR
authorspec=result
printline=0
if listmode='ALL' then printline=1
if ((listmode='KNOWN') & (authorspec ~= 'Unknown')) then printline = 1
if ((listmode='UNKNOWN') & (authorspec = 'Unknown')) then printline = 1
if printline=1 then DO
MODNAME
namespec=result
GETSTYLE
stylespec=result
GETTIME
timespec=result
GETDATE
datespec=result
moduleline = left(modspec, indexwidth)' 'left(namespec, namewidth)' 'left(authorspec, authorwidth)' 'left(stylespec, stylewidth)' 'left(timespec, timewidth)' 'left(datespec, datewidth)
if listfile='NO' then DO
say moduleline
END
else
call writeln(listfilehandle, moduleline)
END
END
if listfile='YES' then
call close(listfilehandle)
EXIT
error:
syntax:
say 'Error at line 'sigl' in MakeList V0.3'
EXIT
break_c:
break_d:
say 'Received a BREAK signal, aborted...'
EXIT
ioerr:
say 'I/O Error at line 'sigl
EXIT